import request from '@/utils/request'
// 获取部门列表
export function getDepartmentList() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
// 新增部门
export function addDepartment(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
// 获取员工简单列表
export function getDepartManagerApi() {
  return request({
    url: '/sys/user/simple',
    method: 'get'
  })
}
// 根据id获得指定部门信息
export function getDepartById(id) {
  return request({
    url: '/company/department/' + id,
    method: 'get'
  })
}
// 根据id修改指定部门信息
export function changeDepartById(id, data) {
  return request({
    url: '/company/department/' + id,
    method: 'put',
    data
  })
}
// 根据id删除指定部门
export function delDepartById(id) {
  return request({
    url: '/company/department/' + id,
    method: 'delete'
  })
}
